<%@ page language="java" contentType="text/html; charset=windows-1255"
    pageEncoding="windows-1255"%>
<%@ page import="java.util.*, java.io.*" %>
<div id="content" class="post">
      		 <h1 class="title">Hello <%=(String)request.getSession().getAttribute("username")%> </h1>
      		 <% Date date = new Date(); 
      			Calendar calendar = GregorianCalendar.getInstance(); // creates a new calendar instance
      			calendar.setTime(date);   // assigns calendar to given date 
      			int hour = calendar.get(Calendar.HOUR_OF_DAY); // gets hour in 24h format
      		 	if (hour > -1 && hour < 6) { %>
      		 	<h2> Good Night</h2>
      		 <% } %>
      		 <% if (hour > 6 && hour < 12) { %>
      		 	<h2> Good Morning</h2>
      		 <% } %>
      		 <% if (hour > 12 && hour < 18) { %>
      		 	<h2> Good Day</h2>
      		 <% } %>
      		 <% if (hour > 18 && hour < 24) { %>
      		 	<h2> Good Evening</h2>
      		 <% } %>
      		 <p>Please choose an option from the menu above. </p>
      		 
</div>

<% String upload = (String)request.getSession().getAttribute("upload");
			if (upload != null) { %>
				<script type="text/javascript"> 
					$('#Home').removeClass("Clicklinkactive");
					$('#Courses').addClass("Clicklinkactive");
					$('#page').load("Web/timeTable.jsp",function(response, status, xhr) {
						  if (status == "error") {
							    var msg = "Sorry but there was an error: ";
							    $("#page").html("<br />" +"<h1>" + msg + xhr.status + " " + xhr.statusText +"</h1>" );
							  }
							});
					alert("File updated successfully!");
				</script>
 <%     	request.getSession().removeAttribute("upload");
			} %>